package trees;

import java.util.Arrays;
import java.util.Collections;
import java.util.stream.Collectors;

public class FindMin {
    public static int findMin(int[] nums) {
        return Collections.min(Arrays.stream(nums).boxed().collect(Collectors.toList()));
    }

    public static void main(String[] args) {
        int[] nums = new int[]{3, 4, 5, 1, 2};
        System.out.println(findMin(nums));
    }
}
